#pragma once

#define	OPZNET_CLIENT_DLL

#ifdef _DEBUG
	#define OPZ_DEBUG_MEMORY
#else
	#define OPZ_REDIRECT_NEWDELETE
#endif

#include "../common.h"
#include "opznet/client.h"

namespace opznet
{
	enum comm_req_type_t
	{	
		USERSIDE_REQ_SEND,
		USERSIDE_REQ_DISCONNECT
	};

	typedef BufPool<vector<char>>::Buf<vector<char>>	char_buf_t;
	#define CHAR_POOL	BufPool<vector<char>>::Instance()

	struct comm_req_t
	{
		comm_req_type_t	type;
		char_buf_t *	buf;
	};

	typedef BufPool<client_msg_t>::Buf<client_msg_t>	msg_buf_t;
	#define MSG_POOL	BufPool<client_msg_t>::Instance()


	extern opzSafeQueue<msg_buf_t *>	msg_queue;
	extern opzSafeQueue<char_buf_t *>	letters;
};